<%@page import="model.PersonModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head> 

		<title>信息维护</title>
		<link rel="stylesheet" href="../js/layui/css/layui.css" media="all" />
		<script type="text/javascript" src="../js/layui/layui.js"></script>
		<script type="text/javascript" src="../js/demo.js">

		</script>
</head>

<form class="layui-form" action="" method="post">


<div class="layui-form-item">
				<label class="layui-form-label" >账户</label>
				<div class="layui-input-block">
					<input type="text" name="password"  placeholder="请输入账户" class="layui-input" style="width: 7.5rem;" id="select_name">
				</div>
			</div>

			<div style="layui-form-item">
				<label class="layui-form-label">城市</label>
				<div class="layui-input-block" style="width:6.25rem ;">
					<select name="address" id="address_select2" >
						<option value="北京">北京</option>
						<option value="上海">上海</option>
						<option value="广州">广州</option>
						<option value="厦门">厦门</option>
						<option value="福州">福州</option>
						<option value="青岛">青岛</option>
						<option value="济南">济南</option>
						<option value="深圳">深圳</option>
						<option value="天津">天津</option>
						<option value="三亚">三亚</option>
						<option value="杭州">杭州</option>
						<option value="成都">成都</option>
						<option value="郑州">郑州</option>
						<option value="济南">济南</option>
						<option value="潍坊">潍坊</option>
					</select>
				</div>
			</div>
   
			<div class="layui-form-item">
				<div class="layui-input-block">
		             <button type="button" type="javascript:" class="layui-btn" onclick="select()" id ="selectidd">搜索</button>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
                       <a href ='/Test2022/web/js/add.jsp' class='layui-btn'>添加</a></td>
				</div>
			</div>


		
			<table class="layui-table" style="width=99%">
				<thead>
					<tr >
						
						<th style="width: 9.375rem;">序号</th>
						<th style="width: 9.375rem;">账户</th>
						<th style="width: 9.375rem;">性别</th>
						<th style="width: 14.375rem;">爱好</th>
						<th style="width: 14.375rem;">地址</th>
						<th style="width: 9.375rem;">操作</th>
					</tr>
				</thead>

				<tbody id="tbody" class="layui-form-item">
			
<% int id=1; %>
<c:forEach var="person" items="${list}" >

<tr id="tr<%=id %>" class="layui-form-item">   
	<td style='width: 9.375rem;' id="id<%=id %>"><%=id %></td>
	<td style='width: 9.375rem;' id="name<%=id %>">${person.username} </td>
	<td style='width: 9.375rem;' id="sex<%=id %>">${person.sex}  </td>
	<td style='width: 14.375rem;' id="hobby<%=id %>" >${person.hobby}</td>
	<td style='width: 14.375rem;' id="address<%=id %>">${person.address}</td>
	<td> <a href ='/Test2022/web/js/update.jsp?id=${person.id}&username=${person.username}&password=${person.password}&sex=${person.sex}&hobby=${person.hobby}&address=${person.address}' class='layui-btn'>修改</a> 
	  <a href ='/Test2022/DeleteServlet?username=${person.username}' class='layui-btn'>删除</a></td>

	<% id++; %>
</tr>
</c:forEach>

		</tbody>		
		</table>
	
	</form>




 
<script >


	

	
</script>

</html>